#ifndef VTKFIELDEXPORT_HPP
#define VTKFIELDEXPORT_HPP

#include "field.hpp"
#include "solverBase.hpp"
#include "tinyxml2.h"
#include "magic_enum.hpp"
#include <string>

namespace hms::vtk
{

namespace xml = tinyxml2;


template<typename MeshType>
void writeDomainField(
	xml::XMLElement* cellData,
	const Field<MeshType>& field,
	const std::string& fieldName
);

/**
 * @brief Use this overload if you only want to write/update a single field.
 * 
 * @tparam SolverType 
 * @param doc 
 * @param solver 
 * @param fieldName 
 */
template<typename SolverType>
void writeDomainField(
	xml::XMLDocument* doc,
	const SolverBase<SolverType>& solver,
	typename SolverBase<SolverType>::FieldName fieldName
);

template<typename SolverType>
void writeDomainFields(
	xml::XMLElement* vtk,
	const SolverBase<SolverType>& solver
);


template<typename SolverType>
void writeDomainFields( xml::XMLDocument* doc, const SolverBase<SolverType>& solver );

template<typename SolverType>
void writeDefaultDomainFields( xml::XMLDocument* doc );

} // end namespace hms::vtk

#include "vtkFieldExport.tpp"

#endif
